<?php
session_start();
isLogin();
if(isset($_POST["Submits"])){
	$bean=new Bean();
	$bean->load("websetting");
	if($bean->validate()){
		reload_js("修改成功","index.php?cmd=system");
	}else{
		reload_js("修改失败，原因：程序错误，请联系技术人员进行修改","index.php");
	}
}
?>
<script language="javascript" src="../templates/<?php echo $moban;?>/js/common.js"></script>
<script language="javascript">
changeWebTitle('系统设置');

function checkRewrite(obj){
	t=document.getElementById('rewrite_postfix');
	if(obj.value==1){
		t.disabled='disabled';
		t.value='/';
	}else{
		t.disabled='';
	}
}
</script>
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>

<div class="ContentRight">
    <div class="ContentRightTop">
      <div class="BarLeft"></div>
      <div class="ContentRightTopText">系统设置</div>
      <div class="BarRight"></div>
      <div class="Cal"></div>
    </div>
    <div class="ContentRightBox">
	<form name="websetting" action="" method="post" >
      <table width="100%" cellpadding="0" class="Table1" bordercolor="#4ab902" border="1" cellspacing="0">
        <tr>
          <td width="21%" height="25" align="right">PID：</td>
          <td width="79%"><input name="PID" type="text" id="PID"  value="<?php echo $userpid?>"/>
          <span class="STYLE1">*</span>&nbsp;例如：mm_16228218_0_0&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.fengsh8.com/taoketuiguang/jiaocheng126.html" target="_blank">什么是PID？如何获取？</a></td>
        </tr>
        <tr>
          <td height="25" align="right">淘宝用户名：</td>
          <td><input name="usernick" type="text" id="usernick"  value="<?php echo $usernick?>"/>
            <span class="STYLE1">*</span>&nbsp;例如：yanglongji85753693</td>
        </tr>
        <tr>
          <td height="25" align="right">最低佣金比率：</td>
          <td><input name="start_commissionRate" type="text" id="start_commissionRate"  value="<?php echo $start_commissionRate?>" onkeyup="value=value.replace(/[^0-9]/,'');"/>
            <span class="STYLE1">*</span>&nbsp;例如：1515，表示15.15%</td>
        </tr>
        <tr>
          <td height="25" align="right">开启jiathis：</td>
          <td><input name="jiathis" type="radio" value="1" checked="checked" />
            是
              <input type="radio" name="jiathis" value="0" <?php if($jiathis==0)echo "checked=checked";?>/>
          否 &nbsp;<a href="http://www.fengsh8.com/help/faq237.html" target="_blank">什么是jiathis？</a></td>
        </tr>
        <tr>
          <td height="25" colspan="2" align="right">&nbsp;</td>
        </tr>
        <tr>
          <td height="25" align="right">网站域名：</td>
          <td><input name="website" type="text" id="website"  value="<?php echo $website?>"/>
            <span class="STYLE1">*</span>&nbsp;例如：http://www.fengsh8.com/help 后面不能带/</td>
        </tr>
        <tr>
          <td height="25" align="right">网站名称：</td>
          <td><input name="webname" type="text" id="webname"  value="<?php echo $webname?>"/>
            <span class="STYLE1">*</span>&nbsp;例如：风尚淘客源码</td>
        </tr>
        <tr>
          <td height="25" align="right">网站标题：</td>
          <td><input name="postfix" type="text" id="postfix"  value="<?php echo $postfix?>"/>
          <span class="STYLE1">*</span>&nbsp;例如：淘客程序购买，淘客程序定做</td>
        </tr>
        <tr>
          <td height="25" align="right">网站关键字：</td>
          <td><textarea name="keywords" rows="5" id="keywords"><?php echo $keywords?></textarea>
          最多50个字，请控制字数，否则提交不能成功</td>
        </tr>
        <tr>
          <td height="25" align="right">网站描述：</td>
          <td><textarea name="description" rows="5" id="description"><?php echo $description?></textarea>
            <a href="http://www.fengsh8.com/taoketuiguang/seo/" target="_blank">SEO学习</a></td>
        </tr>
        <tr>
          <td height="25" colspan="2" align="right">&nbsp;</td>
        </tr>
        <tr>
          <td height="25" align="right">模板名称：</td>
          <td><input name="moban" type="text" id="moban" value="<?php echo $moban?>" /></td>
        </tr>
        <tr>
          <td height="25" align="right">开启缓存：</td>
          <td>
              <input name="cache" type="radio" value="1" checked="checked" />是
              <input type="radio" name="cache" value="0" <?php if($cache==0)echo "checked=checked";?>/>否          </td>
        </tr>
        <tr>
          <td height="25" align="right">缓存时间：</td>
          <td><input name="cachetime" type="text" id="cachetime" value="<?php echo $cachetime?>"  onkeyup="value=value.replace(/[^\d]/g,'')"/>
          单位：小时 一般填写24即可</td>
        </tr>
        <tr>
          <td height="25" align="right">伪静态形式：</td>
          <td>
		  <select name="rewrite" id="rewrite" onchange="checkRewrite(this);">
            <option value="1" selected="selected">目录形式</option>
            <option value="2" <?php if($rewrite==2)echo "selected";?>>后缀名形式</option>
          </select>
		  <input name="rewrite_postfix" type="text" id="rewrite_postfix" value="<?php echo $rewrite_postfix?>" size="10" <?php if($rewrite==1)echo "disabled";?>/>
            <a href="http://www.fengsh8.com/help/faq263.html" target="_blank">查看伪静态形式说明		 </a></td>
        </tr>
        <tr>
          <td height="25" align="right">app调用出错显示信息：</td>
          <td><input name="apierr_msg" type="text" id="apierr_msg" value="<?php echo $apierr_msg?>" size="50"/></td>
        </tr>
        <tr>
          <td height="25" align="right">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td height="25" align="right">显示顶部导航：</td>
          <td><input name="show_topnav" type="radio" value="1" checked="checked" />
            是
              <input type="radio" name="show_topnav" value="0" <?php if($cache==0)echo "checked=checked";?>/>
          否 </td>
        </tr>
        <tr>
          <td height="25" align="right">搜索关键字个数：</td>
          <td><input name="w_keynum" type="text" id="w_keynum" value="<?php echo $search_key_num?>"  onkeyup="value=value.replace(/[^\d]/g,'')"/> </td>
        </tr>
        <tr>
          <td height="25" align="right">最新推荐店铺个数：</td>
          <td><input name="newshopnum" type="text" id="newshopnum" value="<?php echo $newshopnum?>"  onkeyup="value=value.replace(/[^\d]/g,'')"/></td>
        </tr>
        <tr>
          <td height="25" align="right">网站备案号：</td>
          <td><input name="ICP" type="text" id="ICP" value="<?php echo $ICP?>"/>
          例如：浙ICP备10026859号</td>
        </tr>
        <tr>
          <td height="25" align="right">网站统计代码：</td>
          <td><textarea name="tongji" rows="3" id="tongji"><?php echo $tongji?></textarea>
          <a href="http://www.fengsh8.com/taoketuiguang/jiaocheng130.html" target="_blank">什么是统计代码？如何安装？</a></td>
        </tr>
        <tr>
          <td height="25" align="right">站长联系：</td>
          <td><textarea name="QQ" rows="3" id="QQ"><?php echo $QQ?></textarea>
            例如：QQ：1433362766 或者 邮箱： 1433362766@qq.com </td>
        </tr>
        <tr>
          <td height="25" align="right">版权所有：</td>
          <td><a href="http://www.fengsh8.com" target="_blank">风尚淘客程序</a></td>
        </tr>
        <tr>
          <td height="25" align="right">&nbsp;</td>
          <td>
            <input name="Submits" type="submit" id="Submits" value=" 提  交" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input name="Reset" type="reset" id="Reset" value=" 重 置 " />          </td>
        </tr>
      </table>
	  </form>
    </div>
    <div class="Cal"></div>
  </div>